package model

type StockTImer struct {
	Id              int32  `gorm:"column:id;primary_key;AUTO_INCREMENT;NOT NULL" json:"id,omitempty"`
	TimerName       string `gorm:"column:timer_name;NOT NULL;comment:'名称'" json:"timerName,omitempty"`
	TimerSpec       string `gorm:"column:timer_spec;NOT NULL;comment:'CRON表达式'" json:"timerSpec,omitempty"`
	TimerType       int    `gorm:"column:timer_type;comment:'任务类型 0:重复性任务 1：一次性任务'" json:"timerType,omitempty"`
	Execution       string `gorm:"column:execution;NOT NULL;comment:'执行任务的函数名'" json:"execution,omitempty"`
	UniqueCode      string `gorm:"column:unique_code;NOT NULL;comment:'唯一码'" json:"uniqueCode,omitempty"`
	Status          string `gorm:"column:status;NOT NULL;comment:'任务状态 Y:正常 N:禁用 S:暂停'" json:"status,omitempty"`
	ExecutionStatus int    `gorm:"column:execution_status;NOT NULL;comment:'1未执行 2执行中 3已执行成功 4已执行失败'" json:"executionStatus,omitempty"`
	//StartScenes     int        `gorm:"column:start_scenes;comment:'1未执行 2执行中 3已执行成功 4已执行失败'" json:"startScenes,omitempty"`
	CreateBy       string     `gorm:"column:create_by;comment:'创建人'" json:"createBy,omitempty"`
	Remark         string     `gorm:"column:remark;default:null;comment:'备注说明'" json:"remark,omitempty"`
	Parameter      string     `gorm:"column:parameter;default:null;comment:'携带参数'" json:"parameter,omitempty"`
	CreateTime     *LocalTime `gorm:"column:create_time;default:CURRENT_TIMESTAMP;NOT NULL" json:"createTime"`
	LastUpdTime    *LocalTime `gorm:"column:last_upd_time;default:CURRENT_TIMESTAMP;NOT NULL" json:"lastUpdTime"`
	TimerStartTime *LocalTime `gorm:"column:timer_start_time;default:CURRENT_TIMESTAMP" json:"timerStartTime"`
	TimerEndTime   *LocalTime `gorm:"column:timer_end_time;NULL" json:"timerEndTime"`
}

func (s *StockTImer) TableName() string {
	return "stock_Timer"
}
